package com.android.bandroid.guide;

import android.os.Bundle;
import android.support.v4.view.ViewPager;
import android.view.Window;

import com.android.bandroid.LoginActivity;
import com.android.bandroid.R;
import com.android.bandroid.base.BaseActivity;
import com.android.bandroid.guide.adapter.GuideAdapter;


public class GuideActivity extends BaseActivity {
    private ViewPager mViewPager;

    private static final int[] IMGS = new int[]
            {R.mipmap.guide_chao, R.mipmap.guide_ai, R.mipmap.guide_aic, R.mipmap.guide_aica};

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_guide);

        mViewPager = (ViewPager) findViewById(R.id.pager_guide);
        mViewPager.setAdapter(new GuideAdapter(IMGS, this, new GuideCallBackListener() {
            @Override
            public void doGuideFinish() {
                openActivityFinish(LoginActivity.class);
            }
        }));
    }

    public interface GuideCallBackListener{
       public void doGuideFinish();
    }
}

